Repository navigation
feat: give the nested object and its parents to class-level object mapper transforms - #373
Merged
Merged
Conversation
joelwurtz
force-pushed
the
fix/object-mapper-class-transform-value
branch
from
December 3, 2026 14:04
fd68a9c to
d76ab72
Compare
joelwurtz
changed the base branch from
build/symfony-8.2
to
feat/object-mapper-mapping-aware-transform
December 3, 2026 14:04
joelwurtz
force-pushed
the
fix/object-mapper-class-transform-value
branch
from
December 3, 2026 15:43
d76ab72 to
e2e4d64
Compare
joelwurtz
force-pushed
the
feat/object-mapper-mapping-aware-transform
branch
from
December 3, 2026 15:43
38eacbc to
0cfd0df
Compare
joelwurtz
changed the base branch from
feat/object-mapper-mapping-aware-transform
to
main
December 3, 2026 15:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A class-level transform declared with
#[Map(transform: ...)]on a nested source class does not receive the same arguments as with the Symfony ObjectMapper. With the newobjectMapperNestedTransformReceivesSourceconfiguration option (object_mapper_nested_transform_receives_sourcein the bundle), it receives the nested object, the parent source and the parent target, as Symfony does. Root objects andMapCollectionitems are unchanged.The option defaults to
false(current behavior). Not setting it is deprecated, it will default totruein 11.0.Depends on #376.